package com.kingsoft.dc.khaos.module

import com.kingsoft.dc.khaos.{DataSetChannel, KhaosConf, KhaosContext, SchemaChannel}


/**
  * Created by chengguangqing on 2019/6/2.
  */
abstract class SparkModule extends TModule {

  /**
    * 节点逻辑处理的准备信息
    *
    * @param khaosConf : 组件配置信息
    * @param kc        : 组件上下文环境
    */
  override def prepare(khaosConf: KhaosConf, kc: KhaosContext): Any = {}

  /**
    * 节点执行逻辑
    *
    * @param dataCollector :  数据采集器
    */
  override def execute(dataCollector: DataSetChannel): Any = {}

  /**
    * 声明输出schema
    *
    * @param declarer :  输出声明器
    */
  def declareOutputSchema(declarer: SchemaChannel): Any = {}

  /**
    * 获取配置信息
    *21202F2938212B3E22272626252E434D
    * @return :  返回配置信息
    */
  override def getModuleConfiguration(): Option[String] = {
    None
  }

  /**
    * 清除组件相关信息
    */
  override def cleanup(): Unit = {}

}
